import request from "@/utils/request";
import type {
  GetMySingerResponse,
  GetMyVideoResponse,
  GetMyRadioResponse,
  GetMySongListResponse,
} from "./model/mySingerModel";

enum Api {
  getMySingerUrl = "/artist/sublist",
  getMyVideoUrl = "/mv/sublist",
  getMyRadioUrl = "/dj/sublist",
  getSongListUrl = "/user/playlist",
}

/**
 * @description:获取我的歌手
 * @return {*}
 */
export const getMySingerApi = () => {
  return request.get<any, GetMySingerResponse>(Api.getMySingerUrl);
};

/**
 * @description:获取我的视频
 * @return {*}
 */
export const getMyVideoApi = () => {
  return request.get<any, GetMyVideoResponse>(Api.getMyVideoUrl);
};

/**
 * @description:获取我的电台
 * @return {*}
 */
export const getMyRadioApi = () => {
  return request.get<any, GetMyRadioResponse>(Api.getMyRadioUrl);
};

/**
 * @description:获取我的歌单
 * @param {number} uid
 * @return {*}
 */
export const getSongListApi = (uid: number) => {
  return request.get<any, GetMySongListResponse>(Api.getSongListUrl, {
    params: {
      uid,
    },
  });
};
